import Ember from 'ember';
import BaseBusiness from '../base-business';
import Pagination from '../pagination';

export default BaseBusiness.extend(Pagination, {
    header_title: '机构信息',
    queryParams: {
        flag: {
            refreshModel: true
        }
    },
    model() {
        return {};
    },
    setupController: function(controller, model) {

        controller.set("operateFlag", null);
        controller.set("editModel", null);
        controller.set("editLoginNameModel", null);
        var curUser = this.get('global_curStatus').getUser();
        var _self = this;
      //  console.log("user---------  " + curUser.get('org').get('admin').get('id'));
        this.store.findRecord('organization', curUser.get('org.id')).then(function (organization) {
            // var org = curUser.get('org');
            // org.set('admin', admin);
            controller.set("org", organization);
            /*this.store.findRecord('user', organization.get('admin').get('id')).then(function(admin){
              organization.set('admin',admin);
              controller.set("org", organization);
            });*/
            //  controller.set("orgModel", org);
        });
    }
});
